﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smartee.Modelling.Shapes;

namespace Smartee.Modelling.Objects
{
    public class Object : Item
    {
        private int _x;
        private int _y;
        private int _width;
        private int _height;

        private string _name;

        internal int MiddleX { get { return _x + _width / 2; } }
        internal int MiddleY { get { return _y + _height / 2; } }

        private static System.Drawing.Color LineColor = System.Drawing.Color.Black;
        private static System.Drawing.Color FillColor = System.Drawing.Color.Yellow;
        private static Metric metric = Metric.Default;

        public Object(string name, int x, int y, int width, int height)
        {
            _name = name;
            _x = x;
            _y = y;
            _width = width;
            _height = height;
        }

        public override Shape[] Shapes
        {
            get
            {
                return new Shape[] { new Box(LineColor, metric, FillColor, _x, _y, _width, _height), new Text(_name, _x, _y, _width, _height) };
            }
        }
    }
}
